Skip to content

feat: enable js-tracer feature#302

Merged
georgehao merged 11 commits intomainfrom
feat/enable_js_tracer
Sep 9, 2025
Merged

feat: enable js-tracer feature#302
georgehao merged 11 commits intomainfrom
feat/enable_js_tracer

Conversation

@georgehao
Copy link
Copy Markdown
Member

  • Add js-tracer feature to reth-rpc-builder in workspace Cargo.toml
  • Enable js-tracer feature for reth-rpc-eth-api and reth-rpc-eth-types in node crate
  • Add js-tracer feature definition in node Cargo.toml

This enables JavaScript tracer functionality for debugging transactions in the rollup node, following the pattern from scroll-tech/reth PR #334.

- Add js-tracer feature to reth-rpc-builder in workspace Cargo.toml
- Enable js-tracer feature for reth-rpc-eth-api and reth-rpc-eth-types in node crate
- Add js-tracer feature definition in node Cargo.toml

This enables JavaScript tracer functionality for debugging transactions
in the rollup node, following the pattern from scroll-tech/reth PR #334.
@georgehao georgehao requested a review from frisitano September 4, 2025 12:55
Copy link
Copy Markdown
Contributor

@frisitano frisitano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some comments inline.

Comment thread Cargo.toml Outdated
Comment thread crates/node/Cargo.toml Outdated
@georgehao
Copy link
Copy Markdown
Member Author

 curl http://127.0.0.1:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
  "method": "debug_traceTransaction",
  "params": [
    "0x6d5026601e75ddc0cd43c5b5cff830e1326b859712d9e19412c428b37307eb32",
    {
      "tracer": "{\"hist\":{},\"lastOp\":\"\",\"lastDepth\":0,\"step\":function(log, db) {var op = log.op.toString();var depth = log.getDepth();if (depth == this.lastDepth) {var key = this.lastOp + '-' + op;if (this.hist[key]) {this.hist[key]++;} else {this.hist[key] = 1;}}this.lastOp = op;this.lastDepth = depth;},\"fault\":function(log, db) {},\"result\":function(ctx) {return this.hist;}}"
    }
  ],
  "id": 1,
  "jsonrpc": "2.0"
}'
{"jsonrpc":"2.0","id":1,"result":{"ADDNaN":9,"ANDNaN":5,"CALLDATALOADNaN":5,"CALLDATASIZENaN":4,"CALLERNaN":1,"CALLVALUENaN":2,"DUP1NaN":24,"DUP2NaN":14,"DUP3NaN":7,"DUP4NaN":2,"DUP5NaN":2,"DUP6NaN":1,"DUP7NaN":1,"EQNaN":11,"GASNaN":1,"GTNaN":2,"ISZERONaN":11,"JUMPDESTNaN":26,"JUMPINaN":22,"JUMPNaN":12,"KECCAK256NaN":1,"LOG1NaN":2,"LTNaN":2,"MLOADNaN":10,"MSTORENaN":10,"NOTNaN":1,"POPNaN":19,"PUSH0NaN":3,"PUSH1NaN":51,"PUSH2NaN":34,"PUSH32NaN":2,"PUSH4NaN":13,"RETURNDATASIZENaN":1,"SHLNaN":4,"SHRNaN":2,"SLOADNaN":2,"SLTNaN":3,"SSTORENaN":2,"SUBNaN":10,"SWAP1NaN":18,"SWAP2NaN":7,"SWAP3NaN":6,"SWAP4NaN":2}}

Copy link
Copy Markdown
Contributor

@frisitano frisitano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a comment inline

Comment thread Dockerfile Outdated
@frisitano
Copy link
Copy Markdown
Contributor

Why did you introduce nightly builds?

@georgehao
Copy link
Copy Markdown
Member Author

georgehao commented Sep 9, 2025

Why did you introduce nightly builds?

I think maybe we will introduce more other features that we don't want to introduce to the stable in the future. So I name this nightly. it's not the rust nightly. wdyt? or change it to unstable?

@frisitano
Copy link
Copy Markdown
Contributor

Why did you introduce nightly builds?

I think maybe we will introduce more other features that we don't want to introduce to the stable in the future. So I name this nightly. it's not the rust nightly. wdyt? or change it to unstable?

Oh I see, I had misunderstood and assumed you were using rust nightly. I think nightly is fine.

Copy link
Copy Markdown
Contributor

@frisitano frisitano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@georgehao georgehao merged commit 5ac99d5 into main Sep 9, 2025
13 checks passed
@georgehao georgehao deleted the feat/enable_js_tracer branch September 9, 2025 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants